home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Columbia Kermit
/
kermit.zip
/
newsgroups
/
misc.20030409-20031118
/
000043_jaltman2@nyc.rr.com_Fri May 2 09:21:33 EDT 2003.msg
< prev
next >
Wrap
Text File
|
2020-01-01
|
4KB
|
87 lines
Article: 14258 of comp.protocols.kermit.misc
Path: newsmaster.cc.columbia.edu!phl-feed.news.verio.net!iad-feed.news.verio.net!iad-peer.news.verio.net!news.verio.net!news.maxwell.syr.edu!out.nntp.be!propagator2-sterling!in.nntp.be!newsfeed1.easynews.com!easynews.com!easynews!news-west.rr.com!news-server.columbus.rr.com!cyclone.rdc-nyc.rr.com!news-out.nyc.rr.com!twister.nyc.rr.com.POSTED!53ab2750!not-for-mail
From: "Jeffrey Altman [Road Runner NYC]" <jaltman2@nyc.rr.com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.3) Gecko/20030312
X-Accept-Language: en-us, en
MIME-Version: 1.0
Newsgroups: comp.protocols.kermit.misc
Subject: Re: Changed behavior of receive/transmit move-to
References: <b8rfll$kfv$1@cpimail.cpicorp.com> <b8rkdi$mo0$1@watsol.cc.columbia.edu> <3EB182CB.8000502@nyc.rr.com> <b8s3qt$bkm$1@watsol.cc.columbia.edu>
In-Reply-To: <b8s3qt$bkm$1@watsol.cc.columbia.edu>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
Lines: 64
Message-ID: <7Sgsa.48386$J17.32926@twister.nyc.rr.com>
Date: Thu, 01 May 2003 22:04:51 GMT
NNTP-Posting-Host: 66.108.138.151
X-Complaints-To: abuse@rr.com
X-Trace: twister.nyc.rr.com 1051826691 66.108.138.151 (Thu, 01 May 2003 18:04:51 EDT)
NNTP-Posting-Date: Thu, 01 May 2003 18:04:51 EDT
Organization: Road Runner - NYC
Xref: newsmaster.cc.columbia.edu comp.protocols.kermit.misc:14258
Frank da Cruz wrote:
>> Turns out no changes were needed here. SET { SEND, RECEIVE } MOVE-TO
> did not need to use deferred evaluation of embedded variables, since we're
> dealing with names of directories which must already exist (at least for
> now). SET { SEND, RECEIVE } RENAME-TO already deferred evaluation of
> embedded variables, so it does not make sense to change it. Except that it
> was totally broken anyway (it always got a parse error), and that's just
> been fixed.
I am not convinced that this is an acceptable solution. The naive end
user who interactively issues the commands
CD foo
DIR bar
sees that 'bar' does exist and now issues
SET RECEIVE MOVE-TO bar
is going to end up with quite a surprise if s/he accidently changes
directory. Either the file transfer will fail; or the files may
unexpectedly be placed into random locations on the disk. This
behavior could in some situations even be dangerous and irreversible
if the unexpected MOVE-TO results in files of the same name being
overwritten.
Unless the user explicitly requests that the directory be treated as
relative to the current working directory at the time of file transfer
the specified path must be treated as referring to a fixed location.
We should not intentionally be adding features to Kermit which are going
to hurt people who do not happen to know every in and out of the program.
If deferred evaluation is a necessity, then it must be implemented
either with a new command or a switch. If you do not want to deal with
the difficulties of parsing a switch prior to the filename parse it
afterwards.
SET {SEND, RECEIVE} MOVE-TO <path> {/DEFERRED-EVALUATION} {/CREATE-DIR}
> : I think there is a better solution. Kermit already supports on_open,
> : on_close, and on_exit macros. I propose that we simply add support for
> : a new on_cd macro...
> :
> I'll add this to my to-do list and/or revisit it if today's changes are
> not sufficient.
The code to implement the processing of an on_cd macro is trivial.
Add the following code to the end of zchdir():
#ifndef NOSPL
if (nmac) { /* Any macros defined? */
int k; /* Yes */
k = mlook(mactab,"on_cd",nmac); /* Look this up */
if (k >= 0) { /* If found, */
if (dodo(k,zgtdir(),0) > -1) /* set it up, */
parser(1); /* and execute it */
}
}
#endif /* NOSPL */